package com.example.easypoi.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName(value = "user")
public class User {

    /**
     * 用户名
     */
    @TableId(value = "username")
    @Excel(name = "用户名")
    private String username;

    /**
     * 姓名
     */
    @TableField(value = "name")
    @Excel(name = "姓名")
    private String name;

    /**
     * 年龄
     */
    @TableField(value = "age")
    @Excel(name = "年龄")
    private Integer age;

    /**
     * 性别,0表示男，1表示女
     */
    @TableField(value = "sex")
    @Excel(name = "性别",replace = {"男_0", "女_1"})
    private String sex;

    /**
     * 籍贯
     */
    @TableField(value = "address")
    @Excel(name = "籍贯")
    private String address;
}
